package inventory.daoImplementer;

import java.sql.SQLException;

import dbhandelling.Crude;
import dto.Gin;
import inventory.daoInterface.GinDao;

public class GinImplementor extends Crude implements GinDao
{

	@Override
	public void add(Gin gin) throws SQLException 
	{
		String[]values=new String[9];
		values[0]=gin.getGinNo()+"";
		values[1]=gin.getPoNumber();
		values[2]=gin.getGinDate()+"";
		values[3]=gin.getChNo();
		values[4]=gin.getChDate();
		values[5]=gin.getProjectName();
		values[6]=gin.getCostCenter();
		values[7]=gin.getVehicalNo();
		values[8]=gin.getStatus()+"";
		insert("Gin", values);
	}

	@Override
	public void update(Gin gin) {
		// TODO Auto-generated method stub
		this.update("Gin","status" ,gin.getStatus()+"", "ginNo",gin.getGinNo()+"");
		
		
	}

	@Override
	public void delete(Gin gin) {
	this.delete("Gin","ginNo",gin.getGinNo()+"");
		
	}

	

	@Override
	public Gin retreive(String conditionField, String ConditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Gin[] retreiveArray(String conditionField, String ConditionValue) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Gin[] retreiveAll() {
		// TODO Auto-generated method stub
		return null;
	}

}
